package model;

/* Fonctions statiques de generations de valeurs */
public class Utility {
	public static int aleaInt(int min, int max) {
		int res = (int) (Math.random() * (max-min)) + min;
		
		return res;
	}
	
	public static float aleaFloat(float min, float max) {
		float res = (float) ((Math.random() * (max-min)) + min);
		
		return double2Chiffres(res);
	}
	
	public static float double2Chiffres(float value) {		
		return (float) ( ((int)(value*100)) / 100);
	}
}
